package com.weiiew.itemtypeservice.mapper;

import com.weiiew.common.entity.dto.ItemType;
import com.weiiew.common.entity.simple.SimpleType;
import com.weiiew.common.entity.vo.ItemTypeVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description
 * @Author 魏锴
 * @Date 2024/8/6
 */
@Mapper
public interface ItemTypeMapper {
    List<SimpleType> getSimpleItemTypes(int version);

    List<ItemTypeVO> getItemTypes(@Param("name") String name,@Param("version") Integer version);

    boolean renameType(@Param("id") Integer id, @Param("name") String name);

    boolean insertType(ItemType type);

    boolean deleteType(Integer id);

    Integer countItemByType(Integer id);
}
